package com.example.bilibili_miaosha.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @ClassName MQReceiver
 * @Description TODO
 * @Author 川
 * @Date 2022/5/13 15:21
 * @Version 1.0
 **/
@Service
@Slf4j
public class MQReceiver {
    @RabbitListener(queues = {"queue"})
    public void receive (Object msg){
       log.info("接受到消息"+msg);
    }
}
